package com.yan.design.two.establish.s2.f2;

/**
 * 2. 工厂方法
 *      水果抽象类
 * @author shengren.yan
 * @create 2022-07-17
 */
public abstract class Fruit {

    private final String name;

    public Fruit(String name) {
        this.name = name;
    }

    // 公共方法
    public void eat(){
        System.out.println("吃掉----");
    }

}
